package com.nuonuo.controller;

import com.nuonuo.mapper.BuyerMapper;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @author duan
 * @version 1.0
 * @date 2023/9/6 16:36
 */
@RestController
@RequestMapping(value = "")
public class BuyerController {

    private static final Logger LOGGER = LoggerFactory.getLogger(BuyerController.class);
    @Autowired
    private BuyerMapper buyerMapper;



    @GetMapping(value = "getBuyerSubTableCount")
    public int getBuyerSubTableCount(String tableId, String addDate) {
        LOGGER.info("tableId = " + tableId + ", addDate = " + addDate);
        int total = buyerMapper.getCount(tableId, addDate);
        LOGGER.info("tableId = " + tableId + ", addDate = " + addDate + ", total = " + total);
        return total;
    }

}
